import ky from 'ky'
import { BASE_PATH } from 'db://assets/enum'

const query = new URLSearchParams(location.search)

export const request = ky.create({
    prefixUrl: BASE_PATH,
    headers: {
      token: query.get("token"),
    },
    searchParams: {
      bookId: query.get("bookId"),
      chapterIndex: query.get("chapterIndex"),
    }
})
